package com.pay.familycar.base;

import com.pay.familycar.api.ApiRetrofit;
import com.pay.familycar.api.ApiService;

/**
 * @author aichonghui
 * @date 2019/3/27.
 */
public class BasePresenter<V> {

    protected ApiService mApiService = ApiRetrofit.getInstance().getApiService();
    protected V mView;

    public BasePresenter(V view){
        attachView(view);
    }

    public void attachView(V mView){
        this.mView=mView;
    }

    public void detachView(){
        this.mView=null;
    }

    public boolean isViewAttached(){
        return mView != null;
    }

}
